#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>

#include <iostream>
#include <cstdio>

#include "prot.h"
#include "paging_api.h"
#include "host_helpers.h"
#include "result_str.h"

using namespace std;


int main(int argc, char *argv[]) {
  int fd = paramsIO(argc, argv, "loader [-o outFile] inputFile");
  int size = fileSize(fd);
  int n = size / sizeof(interrupt_info);
  
  interrupt_info *r = new interrupt_info[n];
  read(fd, r, size);
  close(fd);
  
  cout << n << " test results:" << endl;
  print_table_n (r, r + n, 3);
  
  delete[] r;
  
  return 0;
}
